package com.smscenter.server.core.response;

import java.util.HashMap;
import java.util.Map;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

/**
 * Created by Administrator on 2016-12-20.
 */
public class WXReponse {

    private static Map<String,String> response=new HashMap<String, String>();
    private static WXReponse instance = new WXReponse();
    public static WXReponse getInstance() {
        return instance;
    }

    public String getResponseMessage(String code){
        String result="SUCCESS";
        try {
            JSONObject jsonObject = JSON.parseObject(code);
            if(!jsonObject.getBoolean("result")){
               result=jsonObject.getString("message");
            }
        }catch (Exception e){
            result="failtrue";
        }
        return result;
    }


}
